//全部返回的数据类型
/*************************全部返回的数据类型******************************/
export interface IResponseData {
  code: number;
  msg: string;
}
export interface IPage {
  pageNum: number;
  pageSize: number;
  params?: {
    name?: string;
  };
}
//添加和编辑定义返回类型
export interface ISave extends IResponseData {
  data: number;
}
//删除定义返回类型
export interface IDeleteResponseData extends IResponseData {
  data: number;
}
/*************************用户部分******************************/
//账号信息类型
export interface IUser {
  id?: number;
  mobile?: string;
  name?: string;
  nickName?: string;
  email?: string;
  deptName?: string;
  roleNames?: null;
  createTime?: string;
  lastUpdateTime?: string;
  password?: string;
  userRoles?: string[];
  deptId?: number;
  status?: number;
}

//数组包含全部的用户信息
export type Records = IUser[];

//获取全部用户信息接口返回的数据ts类型
export interface IUserResponseData extends IResponseData {
  data: {
    content: Records;
    pageNum: number;
    pageSize: number;
    totalPages: number;
    totalSize: number;
  };
}
/*************************角色部分******************************/
export interface IRole {
  id?: number;
  name?: string;
  remark?: string;
  delFlag?: number;
  createBy?: string;
  createTime?: string;
  lastUpdateBy?: string;
  lastUpdateTime?: string;
}

export type Roles = IRole[];
//获取角色信息接口返回的数据ts类型
export interface IRoleResponseData extends IResponseData {
  data: Roles;
}

//获取列表返回的数据类型
export interface IRoleListResponseData extends IResponseData {
  data: {
    content: Roles;
    pageNum: number;
    pageSize: number;
    totalPages: number;
    totalSize: number;
  };
}

/*************************机构部分******************************/
//获取机构树结构返回的数据类型
export interface IDeptTree {
  children?: Depts;
  createBy?: string;
  createTime?: string;
  delFlag?: number;
  id?: number;
  lastUpdateBy?: string;
  lastUpdateTime?: string;
  level?: number;
  name?: string;
  orderNum?: number;
  parentId?: number;
  parentName?: string;
}
export type Depts = IDeptTree[];
export interface IDeptResponseData extends IResponseData {
  data: Depts;
}

/*************************日志部分******************************/
export interface ILog {
  id?: number;
  userName?: string;
  method?: string;
  params?: string;
  ip?: string;
  time?: string;
  createBy?: string;
  createTime?: string;
}

export type RecordLog = ILog[];

export interface ILogResponseData extends IResponseData {
  data: {
    content: RecordLog;
    pageNum: number;
    pageSize: number;
    totalPages: number;
    totalSize: number;
  };
}

/*************************登录日志部分******************************/
export interface ILoginLog {
  id?: number;
  userName?: string;
  status?: number;
  ip?: string;
  createBy?: string;
  createTime?: string;
}

export type RecordLoginLog = ILoginLog[];

export interface ILoginLogResponseData extends IResponseData {
  data: {
    content: RecordLoginLog;
    pageNum: number;
    pageSize: number;
    totalPages: number;
    totalSize: number;
  };
}

/*************************系统配置部分******************************/
export interface IConfig {
  id?: number;
  label?: string;
  value?: string;
  type?: string;
  sort?: number;
  description?: string;
  remarks?: string;
}

/*************************字典管理部分******************************/
export interface IDict {
  id?: number;
  label?: string;
  value?: string;
  type?: string;
  sort?: number;
  description?: string;
  remarks?: string;
}
